//
//  ThemeTableViewCell.m
//  Qyer
//
//  Created by 赵宇 on 15/9/16.
//  Copyright (c) 2015年 赵宇. All rights reserved.
//

#import "ThemeTableViewCell.h"
#import "BaseHeader.h"
@implementation ThemeTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.photoView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0, SCREEN_WIDTH - 20, SCREEN_HEIGHT/4)];
        [self.contentView addSubview:self.photoView];

        
        UIImageView *backView = [[UIImageView alloc]initWithFrame:CGRectMake(10, SCREEN_HEIGHT/7, SCREEN_WIDTH - 20, SCREEN_HEIGHT/4 - SCREEN_HEIGHT/7)];
        [backView setImage:[UIImage imageNamed:@"backViewCell.png"]];
        [self.contentView addSubview:backView];

        self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, SCREEN_HEIGHT/4 - 0.06*SCREEN_HEIGHT, 200, 0.06*SCREEN_HEIGHT)];
        self.nameLabel.font = [UIFont systemFontOfSize:14.];
        self.nameLabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:self.nameLabel];
        
        self.descriptionLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, SCREEN_HEIGHT/4+15, SCREEN_WIDTH - 20, 5)];
        self.descriptionLabel.textColor = [UIColor grayColor];
        self.descriptionLabel.font = [UIFont systemFontOfSize:13.];
        self.descriptionLabel.numberOfLines = 0;
        [self.contentView addSubview:self.descriptionLabel];
        
    }
    return self;
}
-(void)setValueWithModel:(PoisModel *)model
{
    NSURL *url = [NSURL URLWithString:model.photo];
    [self.photoView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"zhanweiPic"]];
    self.nameLabel.text = model.chinesename;
    self.descriptionLabel.text = model.MyDescription;
 
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
